const request = require('./request.js')

// team
// app
// user
const launch = async () => {
  return request.get('/user/launch')
}
const getUserinfo = async () => {
  return request.get('/user/launch')
}
// activity
const getActivityList = async (page, filter, orderBy, ysType) => {
  if (ysType == "活动") {
    return request.post('/activity/getActivityList', { page, filter, orderBy })
  }
  return request.post('/competition/getCompetitionList', { page, filter, orderBy })
}
// competition
const getCompetitionDetail = async (id) => {
  return request.get('/competition/getCompetitionDetail', { id })
}
//编辑信息 注册的时候也要
const updateUserinfo = async(data) => {
  return request.post('/user/updateUserinfo', { data})
}
module.exports = {
  // app
  // user
  request,
  launch,
  // activity
  getActivityList,
  // competition
  getCompetitionDetail,
  updateUserinfo
}